package data

import (
	"fmt"
	goSpider "github.com/Flyits/goSpider/src"
	"time"
)

type Brand struct {
	ID          int
	FirstLetter string
	Name        string
	Logo        string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func (Brand) TableName() string {
	return "life_car_brands"
}
func (Brand) GetHandler() string {
	return "DataHandle"
}

// 异步处理/存储回调方法  也可在 response 里直接同步处理/存储
func (brand *Brand) DataHandle(spider *goSpider.Spider) {
	fmt.Println("数据：", brand)

	// todo 处理……
	//
	// todo 存储……
}
